copr: mark git checkout as safe
authorJonathan Lebon <jonathan@jlebon.com>
Thu, 26 May 2022 20:54:43 +0000 (16:54 -0400)
committerJonathan Lebon <jonathan@jlebon.com>
Thu, 26 May 2022 20:54:43 +0000 (16:54 -0400)
Recent git became more strict wrt git repos in parent dirs owned by
other users. This broke our COPR builds due to the git checkout being
created by a different user and mounted in. We need to explicitly mark
the repo as safe.

For more information, see:
https://github.com/actions/checkout/issues/760

.copr/Makefile

index 81a022133c4caf69ea000117f49c589474d36b9b..63669e1d2f8afe78a2d9ffddbbd904570e054016 100644 (file)
@@ -1,5 +1,7 @@
 srpm:
        dnf install -y git
+       # similar to https://github.com/actions/checkout/issues/760, but for COPR
+       git config --global --add safe.directory '*'
        ci/make-git-snapshot.sh
        curl -LO https://src.fedoraproject.org/rpms/ostree/raw/rawhide/f/ostree.spec
        sed -ie "s,^Version:.*,Version: $$(git describe --always --tags | sed -e 's,-,\.,g' -e 's,^v,,')," ostree.spec